"""
Configuration constants and paths for the robotics simulation.
"""

# Asset path configuration
ASSET_PATH = "/home/irmv9993/workspace/graduation-project/assets"

# Physics simulation parameters
SIMULATION_CONFIG = {
    'headless': False,
    'anti_aliasing': 0,
    'hide_ui': False,
    'multi_gpu': False,
    'use_fabric': False,
    'physics_dt': '1/240',
    'rendering_dt': '1/240',
}

# Robot configuration
ROBOT_CONFIG = {
    'g1_usd_path': f"{ASSET_PATH}/robots/g1/g1_29dof_color.usd",
    'empty_scene_path': f"{ASSET_PATH}/scenes/empty.usd",
    'onnx_model_path': f"{ASSET_PATH}/robots/g1/policy/move_by_speed/g1_15000.onnx",
    'initial_position': [0.0, 0.0, 0.8],  # Robot initial position
    'prim_path': "/g1",
    'imu_path': "/g1/imu_link",  # Fixed IMU sensor path
}

# G1 Robot PD Parameters (Gym ordering - from source code)
G1_PD_GAINS = {
    'kps_gym': [
        150.0,
        150.0,
        150.0,
        300.0,
        50.0,
        50.0,
        150.0,
        150.0,
        150.0,
        300.0,
        50.0,
        50.0,
        300.0,
        200.0,
        200.0,
        200.0,
        100.0,
        20.0,
        20.0,
        20.0,
        200.0,
        200.0,
        200.0,
        100.0,
        20.0,
        20.0,
        20.0,   # right_wrist_yaw_joint
    ],
    'kds_gym': [
        2.0000,
        2.0000,
        2.0000,
        4.0000,
        5.0000,
        5.0000,
        2.0000,
        2.0000,
        2.0000,
        4.0000,
        5.0000,
        5.0000,
        5.0000,
        4.0000,
        4.0000,
        4.0000,
        1.0000,
        0.5000,
        0.5000,
        0.5000,
        4.0000,
        4.0000,
        4.0000,
        1.0000,
        0.5000,
        0.5000,
        0.5000,
    ]
}

# Default joint positions (Gym ordering - from source code)
DEFAULT_DOF_POS_GYM = None  # Will be set in robot module

# Simulation loop parameters
SIMULATION_LOOP = {
    'max_frames': 2400,  # 10 seconds at 240Hz
    'render_interval': 5,  # Every 5 frames
    'debug_interval': 30,  # Debug print every 30 frames
    'status_interval': 60,  # Status print every 60 frames
}